#ifndef XPMDOC_DAL_DOC_XML_ACCESS_H
#define XPMDOC_DAL_DOC_XML_ACCESS_H
#include <string>
#include "model/rdf/Factory.h"
#include "model/rdf/Project.h"

namespace xercesc_3_1 {
	class DOMImplementation;
	class DOMLSParser;
	class DOMLSSerializer;
	class XercesDOMParser;
}


namespace xpm {
	using namespace std;
	
	class RdfFactory : public Factory {
	public:
		RdfFactory( bool isSax2 = true): _isSax2(isSax2) {Init();}
		void Init();
		virtual ~RdfFactory();
		void setSourceFiles(string projectSources, string rdfsFile, string rdfFile, string mynamespace);
		//parse the xml document with schema, return the true of false
		//serilizae xml 
		//parses
		void ParseWithDomLS(Project *project);
		void ParseWithSax2(Project *project);
		void save(Project *project);
		void parse(Project *project);
	private:
		void serelizeRdf(Project *project);
		void serelizeRdfs(Project *project);
		xercesc_3_1::DOMImplementation* m_impl;
		xercesc_3_1::DOMImplementation* m_docImpl;
		xercesc_3_1::DOMLSParser* m_domparser;
		xercesc_3_1::XercesDOMParser* m_parser;
		xercesc_3_1::DOMLSSerializer* m_serializer;
		string _projectSources;
		string _baseName;
		string _rdfsfile;
		string _rdffile;
		string _mynamespace;
		bool _isSax2;
		string _initialRdf;
		string _initialRdfs;
	};
}
#endif